USE DeltaFlex
GO
IF ( OBJECT_ID('dbo.sp_InsertarConcepte_Albara') IS NOT NULL ) 
   DROP PROCEDURE dbo.sp_InsertarConcepte_Albara
GO

CREATE PROCEDURE sp_InsertarConcepte_Albara
				@IDALBARA int,
				@IDARTICLE int,
				@QUANTITAT decimal(8,4),
				@STRSUPERFICIE varchar(50),
				@DECIMALSUPERFICIE decimal(8,4),
				@UNITATS varchar(5),
				@PVP decimal(8,4),
				@IMPORT decimal(8,4)
								
AS
BEGIN
	SET NOCOUNT ON

	DECLARE @IDCONCEPTE_ALBARA int = NEXT VALUE FOR SEQ_CONCEPTE_ALBARA;
	
INSERT INTO CONCEPTE_ALBARA
           (IDCONCEPTE_ALBARA
           ,IDALBARA
           ,IDARTICLE
           ,QUANTITAT
           ,STRSUPERFICIE
		   ,DECIMALSUPERFICIE
		   ,UNITATS
		   ,PVP
		   ,IMPORT)
     VALUES
           (@IDCONCEPTE_ALBARA
           ,@IDALBARA
           ,@IDARTICLE
           ,@QUANTITAT
           ,@STRSUPERFICIE
		   ,@DECIMALSUPERFICIE
		   ,@UNITATS
		   ,@PVP
		   ,@IMPORT)
	END
GO

